package com.example.capsule_chat0322.activity;


import android.os.Build;
import android.os.Bundle;
import android.text.method.ScrollingMovementMethod;
import android.widget.TextView;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import com.example.capsule_chat0322.R;
import com.example.capsule_chat0322.layout.ItemGroup;

/**
 * @Author zhuzhiming
 * @Date 2022/5/17 20:00
 */
public class OneChatRecordInfoActivity extends AppCompatActivity {

    private ItemGroup sender_name;
    private ItemGroup room_name;
    private ItemGroup send_time;
    private TextView send_content;


    @RequiresApi(api = Build.VERSION_CODES.O)
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.one_chat_record_info);
        initView();
    }

    @RequiresApi(api = Build.VERSION_CODES.O)
    private void initView() {


        sender_name = findViewById(R.id.user_nickname);
        room_name = findViewById(R.id.room_name);
        send_time = findViewById(R.id.send_time);
        send_content = findViewById(R.id.content);

        send_content.setMovementMethod(ScrollingMovementMethod.getInstance());



        String senderName = getIntent().getStringExtra("senderName");
        String sendTime = getIntent().getStringExtra("sendTime");
        String roomName = getIntent().getStringExtra("roomName");
        String content = getIntent().getStringExtra("content");

        room_name.getContentEdt().setText(roomName);
        sender_name.getContentEdt().setText(senderName);
        send_time.getContentEdt().setText(sendTime);
        send_content.setText(content);

    }


}
